import { defineStore } from "pinia";
import { ref, computed } from 'vue'
//系统初始化数据
interface webInfoInterface{
  pcLogo: string
  pcTitle: string
  pcDesc: string
}
interface serviceDataInterface{
  title: string
  qrcode: string
  groupQrcode: string
  mobile: string
}
export const useSysStore = defineStore("user", () => {
  const isLogin = ref(localStorage.getItem('isLogin') || false); // 判断是否登录
  const userInfo = ref(localStorage.getItem('userInfo') || '{}')
  const webInfo = ref<webInfoInterface>(localStorage.getItem('webInfo') || '{}')
  const serviceData = ref<serviceDataInterface>(localStorage.getItem('serviceData') || '{}')
  return { isLogin, userInfo, webInfo, serviceData };

});
